import PropTypes from 'prop-types';
import React, { Component } from 'react'

export class Tabcont extends Component {
  render() {
      const {cont}=this.props
    return (
      <div>
          {cont.length?cont.map((item,index)=>{
              return <li
              key={item.id}
              >
              
                  <img src={item.img} alt="" />
                  <p>{item.name}</p>
                  <p>{item.price}</p>
              </li>
          }):'暂无数据'}
      </div>
    )
  }
}

Tabcont.propTypes = {
    cont: PropTypes.array,
};

Tabcont.defaultProps = {
    cont:[]
};

export default Tabcont